package com.example.mbl.dao;

import com.example.mbl.dto.ResearchArticleDto;
import com.example.mbl.entity.Research;
import com.example.mbl.result.business.ArticleResult;
import com.example.mbl.result.business.ResearchPageResult;
import com.example.mbl.result.business.ResearchResult;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ResearchMapper {
    int deleteByPrimaryKey(String researchid);

    int insert(Research record);

    int insertSelective(Research record);

    Research selectByPrimaryKey(String researchid);

    int updateByPrimaryKeySelective(Research record);

    int updateByPrimaryKey(Research record);

    List<ResearchPageResult> getResearchList(@Param("name") String name,
                                             @Param("start") int start,
                                             @Param("pagesize") int pagesize);

    ResearchResult getResearchItem(String researchid);

    List<ArticleResult> getArticlesByResearchid(String researchid);

    int setResearchVisible(String researchid);
    int addResearchArticle(ResearchArticleDto researchArticleDto);
    int deleteResearchArticle(int id);
}